package model;

import services.AlarmType;

/**
 * Перечисление типов будильника
 * @author Savva
 *
 */
public class AlarmTypeWrapper {
	private  int type;
	private int id = -1;
	private String description;
	private AlarmTypeWrapper(int id, int i, String str) {
		this.id = id;
		type = i;
		description = str;
	}

	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	
	
	public static AlarmTypeWrapper wrap(AlarmType type) {
		return new AlarmTypeWrapper(type.getId(), type.getType(), type.getDescription());
	}
	public AlarmType toAlarmType() {
		return new AlarmType(description, id, type);
	}
	@Override
	public String toString() {
		return description;
	}
}
